# -*- coding: utf-8 -*-
"""
created on 2017/12/11 13:26

@author: didichen
"""
import math


class Sphere(object):
    def __init__(self, radius, mass):
        self.radius = radius
        self.mass = mass

    def get_radius(self):
        return self.radius

    def get_mass(self):
        return self.mass

    def get_volume(self):
        return round(math.pi * (4 / 3) * pow(self.radius, 3), 5)

    def get_surface_area(self):
        return round(math.pi * 4 * pow(self.radius, 2), 5)

    def get_density(self):
        return round(self.mass/self.get_volume(), 5)

if __name__ == '__main__':
    ball = Sphere(2, 50)

    print(ball.get_density())
    # test.assert_equals(ball.get_radius(), 2, "Check radius")
    # test.assert_equals(ball.get_mass(), 50, "Check mass")
    # test.assert_equals(ball.get_volume(), 33.51032, "Check volume")
    # test.assert_equals(ball.get_surface_area(), 50.26548, "Check area")
    # test.assert_equals(ball.get_density(), 1.49208, "Check density")
